#include <stdio.h>

int func(int **num)
{
    **num += 1;
}

// int func1(char *name)
// {
//     *name = "sdf";
// }
int main()
{
    int s = 1;
    int *ptr1 = &s;//指针变量指向value的地址
    #if 1
    *ptr1 = 100;
    printf("s :%d\n", s);
    printf("&s :%p\n", &s);
    printf("s :%d\n", s);

    printf("*ptr1:%d\n", *ptr1);
    printf("&ptr1:%p\n", &ptr1);
    printf("ptr1:%p\n", ptr1);

    #if 0
    int **ptr2 = &ptr1;//二级指针指向指针变量ptr1的地址
    **ptr2 = 200;
    
    printf("s :%d\n", s);
    printf("**ptr2:%d\n", **ptr2);
    printf("ptr2:%p\n", ptr2);
    printf("&ptr2:%p\n", &ptr2);
    #else
    int *num = ptr1;
    *num = 56;

    printf("s :%d\n", s);
    printf("*num:%d\n", *num);
    printf("num:%p\n", num);
    printf("&num:%p\n", &num);
    #endif
#endif

 

    return 0;
}